{% extends '0.框架.html'%}
{% block head %}
<script src="{% static 'jquery-3.7.1.min.js' %}"></script>
<script src="{% static 'js/pub_blog.js' %}"></script>
    <script src="{% static 'wangeditor/index.js' %}"></script>
    <link rel="stylesheet" href="{% static 'wangeditor/css/style.css' %}">
{% endblock %}
{% block title %}
发布博客
{% endblock %}
{% block mate %}
<h1>发布博客</h1>
    <div class="mt-3">
    <form action="" method="post">
    {% csrf_token %}
        <div class="mt-3">
            <label class="form-label">标题</label>
            <input type="text" name="title" class="form-control">

        </div>
       <div class="mt-3">
            <label class="form-label">分类</label>
           <select name="category" class="form-select" id="category-select">
            {% for category in categories %}
                <option value="{{ category.id }}">{{ category.name }}</option>
               {% endfor %}
           </select>

        </div>
             <div class="mt-3">
            <label class="form-label">内容</label>
<div id="editor—wrapper">
    <div id="toolbar-container"><!-- 工具栏 --></div>
    <div id="editor-container"><!-- 编辑器 --></div>
</div>
        </div>

    <div class="mt-3 text-end">
        <button class="btn btn-primary" id="submit-btn">发布</button>
    </div>
    </form>
    </div>
{% endblock %}
